const Mock=require("mockjs");

const data=Mock.mock({
    'address|2': [{
        id: '@id',
        name: '@cname',
        tel: /^1[3-9]\d{9}$/,
        province: '@province',
        city: '@city',
        county: '@county',
        addressDetail: '@ctitle(3,8)',
        isDefault: false,
    }]
})

module.exports = {
    devServer:{
        before(app)
        {
            app.get("/getAddress",(req,res)=>
            {
                res.send(data.address);
            })
        }
    }
}